package com.usr.usrsimplebleassistent;

import android.bluetooth.BluetoothGattCharacteristic;

import com.usr.usrsimplebleassistent.bean.MService;

import java.util.ArrayList;
import java.util.List;

public class BleGlobal {

    private static BleGlobal shareInstance;
    private List<BluetoothGattCharacteristic> characteristics = new ArrayList<>();
    private BluetoothGattCharacteristic characteristic;
    private List<MService> services = new ArrayList<>();//搜索到的设备跟设备服务

    public static BleGlobal getInstance(){
        if (shareInstance == null){
            shareInstance = new BleGlobal();
        }
        return shareInstance;
    }

    public void setCharacteristics(List<BluetoothGattCharacteristic> characteristics) {
        this.characteristics = characteristics;
    }

    public List<BluetoothGattCharacteristic> getCharacteristics() {
        return characteristics;
    }

    public BluetoothGattCharacteristic getCharacteristic() {
        return characteristic;
    }

    public void setCharacteristic(BluetoothGattCharacteristic characteristic) {
        this.characteristic = characteristic;
    }

    public List<MService> getServices() {
        return services;
    }

    public void setServices(List<MService> services) {
        this.services = services;
    }
}
